Optimal. Leaf size=517 \[ -\frac {2 (a-b) \sqrt {a+b} \left (24 a^3 b B+57 a b^3 B-16 a^4 C-6 a^2 b^2 (7 A+4 C)+21 b^4 (9 A+7 C)\right ) \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{315 b^5 d}-\frac {2 (a-b) \sqrt {a+b} \left (12 a^2 b (2 B-C)-16 a^3 C-6 a b^2 (7 A-3 B+6 C)-3 b^3 (63 A-25 B+49 C)\right ) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{315 b^4 d}-\frac {2 \left (12 a^2 b B-75 b^3 B-8 a^3 C-a b^2 (21 A+13 C)\right ) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^3 d}+\frac {2 \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec (c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^2 d}+\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.07, antiderivative size = 517, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4181, 4187,
4177, 4167, 4090, 3917, 4089} \begin {gather*} \frac {2 \tan (c+d x) \sec (c+d x) \left (-6 a^2 C+9 a b B+63 A b^2+49 b^2 C\right ) \sqrt {a+b \sec (c+d x)}}{315 b^2 d}-\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) \left (-16 a^3 C+12 a^2 b (2 B-C)-6 a b^2 (7 A-3 B+6 C)-3 b^3 (63 A-25 B+49 C)\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{315 b^4 d}-\frac {2 \tan (c+d x) \left (-8 a^3 C+12 a^2 b B-a b^2 (21 A+13 C)-75 b^3 B\right ) \sqrt {a+b \sec (c+d x)}}{315 b^3 d}-\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) \left (-16 a^4 C+24 a^3 b B-6 a^2 b^2 (7 A+4 C)+57 a b^3 B+21 b^4 (9 A+7 C)\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{315 b^5 d}+\frac {2 (a C+9 b B) \tan (c+d x) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)}}{63 b d}+\frac {2 C \tan (c+d x) \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)}}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3917
Rule 4089
Rule 4090
Rule 4167
Rule 4177
Rule 4181
Rule 4187
Rubi steps
\begin {align*} \int \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}+\frac {2}{9} \int \frac {\sec ^3(c+d x) \left (\frac {3}{2} a (3 A+2 C)+\frac {1}{2} (9 A b+9 a B+7 b C) \sec (c+d x)+\frac {1}{2} (9 b B+a C) \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}+\frac {4 \int \frac {\sec ^2(c+d x) \left (a (9 b B+a C)+\frac {1}{4} b (63 a A+45 b B+47 a C) \sec (c+d x)+\frac {1}{4} \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx}{63 b}\\ &=\frac {2 \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec (c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^2 d}+\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}+\frac {8 \int \frac {\sec (c+d x) \left (\frac {1}{4} a \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right )+\frac {1}{8} b \left (189 A b^2+207 a b B+2 a^2 C+147 b^2 C\right ) \sec (c+d x)-\frac {3}{8} \left (12 a^2 b B-75 b^3 B-8 a^3 C-a b^2 (21 A+13 C)\right ) \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx}{315 b^2}\\ &=-\frac {2 \left (12 a^2 b B-75 b^3 B-8 a^3 C-a b^2 (21 A+13 C)\right ) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^3 d}+\frac {2 \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec (c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^2 d}+\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}+\frac {16 \int \frac {\sec (c+d x) \left (\frac {3}{16} b \left (6 a^2 b B+75 b^3 B-4 a^3 C+3 a b^2 (49 A+37 C)\right )+\frac {3}{16} \left (24 a^3 b B+57 a b^3 B-16 a^4 C-6 a^2 b^2 (7 A+4 C)+21 b^4 (9 A+7 C)\right ) \sec (c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx}{945 b^3}\\ &=-\frac {2 \left (12 a^2 b B-75 b^3 B-8 a^3 C-a b^2 (21 A+13 C)\right ) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^3 d}+\frac {2 \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec (c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^2 d}+\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}+\frac {\left (24 a^3 b B+57 a b^3 B-16 a^4 C-6 a^2 b^2 (7 A+4 C)+21 b^4 (9 A+7 C)\right ) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{315 b^3}-\frac {\left ((a-b) \left (12 a^2 b (2 B-C)-16 a^3 C-6 a b^2 (7 A-3 B+6 C)-3 b^3 (63 A-25 B+49 C)\right )\right ) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{315 b^3}\\ &=-\frac {2 (a-b) \sqrt {a+b} \left (24 a^3 b B+57 a b^3 B-16 a^4 C-6 a^2 b^2 (7 A+4 C)+21 b^4 (9 A+7 C)\right ) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{315 b^5 d}-\frac {2 (a-b) \sqrt {a+b} \left (12 a^2 b (2 B-C)-16 a^3 C-6 a b^2 (7 A-3 B+6 C)-3 b^3 (63 A-25 B+49 C)\right ) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{315 b^4 d}-\frac {2 \left (12 a^2 b B-75 b^3 B-8 a^3 C-a b^2 (21 A+13 C)\right ) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^3 d}+\frac {2 \left (63 A b^2+9 a b B-6 a^2 C+49 b^2 C\right ) \sec (c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{315 b^2 d}+\frac {2 (9 b B+a C) \sec ^2(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{63 b d}+\frac {2 C \sec ^3(c+d x) \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 20.35, size = 920, normalized size = 1.78 \begin {gather*} \frac {4 \sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left ((a+b) \left (-24 a^3 b B-57 a b^3 B+16 a^4 C+6 a^2 b^2 (7 A+4 C)-21 b^4 (9 A+7 C)\right ) E\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+b (a+b) \left (-16 a^3 C+12 a^2 b (2 B+C)-6 a b^2 (7 A+3 B+6 C)+3 b^3 (63 A+25 B+49 C)\right ) F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+\left (-24 a^3 b B-57 a b^3 B+16 a^4 C+6 a^2 b^2 (7 A+4 C)-21 b^4 (9 A+7 C)\right ) \tan \left (\frac {1}{2} (c+d x)\right ) \left (b-b \tan ^4\left (\frac {1}{2} (c+d x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^2\right )\right )}{315 b^4 d \sqrt {b+a \cos (c+d x)} (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) \sec ^{\frac {5}{2}}(c+d x) \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}}}+\frac {\cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac {4 \left (-42 a^2 A b^2+189 A b^4+24 a^3 b B+57 a b^3 B-16 a^4 C-24 a^2 b^2 C+147 b^4 C\right ) \sin (c+d x)}{315 b^4}+\frac {4 \sec ^3(c+d x) (9 b B \sin (c+d x)+a C \sin (c+d x))}{63 b}+\frac {4 \sec ^2(c+d x) \left (63 A b^2 \sin (c+d x)+9 a b B \sin (c+d x)-6 a^2 C \sin (c+d x)+49 b^2 C \sin (c+d x)\right )}{315 b^2}+\frac {4 \sec (c+d x) \left (21 a A b^2 \sin (c+d x)-12 a^2 b B \sin (c+d x)+75 b^3 B \sin (c+d x)+8 a^3 C \sin (c+d x)+13 a b^2 C \sin (c+d x)\right )}{315 b^3}+\frac {4}{9} C \sec ^3(c+d x) \tan (c+d x)\right )}{d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(5959\) vs.
\(2(479)=958\).
time = 1.14, size = 5960, normalized size = 11.53
method | result | size |
default | \(\text {Expression too large to display}\) | \(5960\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sec {\left (c + d x \right )}} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\cos \left (c+d\,x\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________